package gbench.appdemo.myworld.economy.demand;

import java.time.LocalDateTime;

import gbench.appdemo.myworld.economy.society.Individual;

/**
 * 需求Id,需求类型,需求提出时间,需求期望解决时间,需求预算
 * @author gbench
 *
 */
public interface IDemand {
    /**
     * 
     * @return
     */
    public String getId();

    /**
     * 
     * @return
     */
    public String getName();

    /**
     * 
     * @return
     */
    public String getType();

    /**
     * 
     * @return
     */
    public LocalDateTime getTime();

    /**
     * 
     * @return
     */
    public Long getExpiredTime();
    
    /**
     * 
     * @return
     */
    public boolean isResolved();
    
    /**
     * 
     * @return
     */
    public void resolve();
    
    /**
     * 
     * @return
     */
    public Double score();
    
    /**
     * 
     * @return
     */
    public Individual Owner();
    
    /**
     * 
     */
    public Double getQuantity();

    /**
     * 
     * @return
     */
    public default boolean isExpired() {
        return LocalDateTime.now().isAfter(this.getTime().plusSeconds(this.getExpiredTime()));
    }
}
